<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>LAnimation</title>
		<script type="text/javascript" src="../load_lufylegend.js"></script>
	</head>
	<body>
			<div id="legend"></div>
			<script type="text/javascript">
			var imgData = [
			{name : "player-0", path : "./player-0.png"}, 
			{name : "player-1", path : "./player-1.png"}, 
			{name : "player-2", path : "./player-2.png"}, 
			{name : "player-3", path : "./player-3.png"}, 
			{name : "player-4", path : "./player-4.png"}
			];
			LInit(200, "legend", 800, 450, main);
			function main() {
				LLoadManage.load(imgData, null, gameInit);
			}
			function gameInit(result) {
				var list = LGlobal.divideCoordinate(480, 210, 1, 4);
				var data = new LBitmapData(result["player-0"], 0, 0, 120, 210);
				var playerLeft = new LAnimationTimeline(data, list);
				addChild(playerLeft);

				var datas = [];
				var listChild = [];
				for (var i = 0; i < 4; i++) {
					datas.push(new LBitmapData(result["player-" + (i + 1)]));
					listChild.push({dataIndex : i, x : 0, y : 0, width : 120, height : 210, sx : 0, sy : 0});
				}
				var playerRight = new LAnimationTimeline(datas, [listChild]);
				playerRight.x = 200;
				addChild(playerRight);
			}
			</script>
	</body>
</html>
